home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Beta / Quicktime 2.0 Beta.iso / Programming Stuff / Interfaces / Universal Interfaces / Dictionary.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-30  |  3.9 KB  |  132 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        Dictionary.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef __DICTIONARY__
  13. #define __DICTIONARY__
  14.  
  15. #ifndef __TYPES__
  16. #include <Types.h>
  17. /*    #include <ConditionalMacros.h>                                */
  18. /*    #include <MixedMode.h>                                        */
  19. /*        #include <Traps.h>                                        */
  20. #endif
  21.  
  22. #ifndef __FILES__
  23. #include <Files.h>
  24. /*    #include <OSUtils.h>                                        */
  25. /*    #include <SegLoad.h>                                        */
  26. #endif
  27.  
  28.  
  29. /*------------------------------------------------------------------------------------------
  30.     Constant definitions.
  31. ------------------------------------------------------------------------------------------ */
  32.  
  33.  
  34. /* Dictionary data insertion modes. */
  35.  
  36. enum  {
  37.     kInsert                        = 0,                            /* Only insert the input entry if there is nothing in the dictionary that matches the key. */
  38.     kReplace                    = 1,                            /* Only replace the entries which match the key with the input entry. */
  39.     kInsertOrReplace            = 2                                /* Insert the entry if there is nothing in the dictionary which matches the key. 
  40.                          * If there is already matched entries, replace the existing matched entries with the input entry. */
  41. };
  42.  
  43.  
  44. /* This Was InsertMode */
  45.  
  46. typedef short DictionaryDataInsertMode;
  47.  
  48.  
  49. /* Key attribute constants.        */
  50.  
  51. #define kIsCaseSensitive 0x10
  52.  
  53. #define kIsNotDiacriticalSensitive 0x20
  54.  
  55.  
  56. /* Registered attribute type constants.    */
  57.  
  58. enum  {
  59.     kNoun                        = -1,
  60.     kVerb                        = -2,
  61.     kAdjective                    = -3,
  62.     kAdverb                        = -4
  63. };
  64.  
  65.  
  66. /* This Was AttributeType */
  67.  
  68. typedef signed char DictionaryEntryAttribute;
  69.  
  70.  
  71. /* ------------------------------------------------------------------------------------------
  72.  
  73.     Type definitions.
  74.  
  75. ------------------------------------------------------------------------------------------ */
  76.  
  77.  
  78. /* Dictionary information record.    */
  79.  
  80. #if defined(powerc) || defined (__powerc)
  81. #pragma options align=mac68k
  82. #endif
  83. struct DictionaryInformation {
  84.     FSSpec                        dictionaryFSSpec;
  85.     long                        numberOfRecords;
  86.     long                        currentGarbageSize;
  87.     ScriptCode                    script;
  88.     short                        maximumKeyLength;
  89.     unsigned char                keyAttributes;
  90. };
  91. #if defined(powerc) || defined(__powerc)
  92. #pragma options align=reset
  93. #endif
  94.  
  95. typedef struct DictionaryInformation DictionaryInformation;
  96.  
  97.  
  98. /* --------------------------------------------------------------------------------------
  99.  
  100.     Function ProtoTypes.
  101.  
  102. -------------------------------------------------------------------------------------- */
  103.  
  104. #ifdef __cplusplus
  105. extern "C" {
  106. #endif
  107.  
  108. extern pascal OSErr InitializeDictionary(FSSpecPtr theFsspecPtr, short maximumKeyLength, unsigned char keyAttributes, ScriptCode script)
  109.  THREEWORDINLINE(0x303C, 0x0500, 0xAA53);
  110. extern pascal OSErr OpenDictionary(FSSpecPtr theFsspecPtr, char accessPermission, long *dictionaryReference)
  111.  THREEWORDINLINE(0x303C, 0x0501, 0xAA53);
  112. extern pascal OSErr CloseDictionary(long dictionaryReference)
  113.  THREEWORDINLINE(0x303C, 0x0202, 0xAA53);
  114. extern pascal OSErr InsertRecordToDictionary(long dictionaryReference, ConstStr255Param key, Handle recordDataHandle, DictionaryDataInsertMode whichMode)
  115.  THREEWORDINLINE(0x303C, 0x0703, 0xAA53);
  116. extern pascal OSErr DeleteRecordFromDictionary(long dictionaryReference, ConstStr255Param key)
  117.  THREEWORDINLINE(0x303C, 0x0404, 0xAA53);
  118. extern pascal OSErr FindRecordInDictionary(long dictionaryReference, ConstStr255Param key, Ptr requestedAttributeTablePointer, Handle recordDataHandle)
  119.  THREEWORDINLINE(0x303C, 0x0805, 0xAA53);
  120. extern pascal OSErr FindRecordByIndexInDictionary(long dictionaryReference, long recordIndex, Ptr requestedAttributeTablePointer, Str255 recordKey, Handle recordDataHandle)
  121.  THREEWORDINLINE(0x303C, 0x0A06, 0xAA53);
  122. extern pascal OSErr GetDictionaryInformation(long dictionaryReference, DictionaryInformation *theDictionaryInformation)
  123.  THREEWORDINLINE(0x303C, 0x0407, 0xAA53);
  124. extern pascal OSErr CompactDictionary(long dictionaryReference)
  125.  THREEWORDINLINE(0x303C, 0x0208, 0xAA53);
  126. #ifdef __cplusplus
  127. }
  128. #endif
  129.  
  130. #endif
  131.  
  132.